package com.shujia.rpc;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

public class Client {

    public static void main(String[] args) throws RemoteException, NotBoundException, MalformedURLException {

        RMIQueryStatus lookup = (RMIQueryStatus) Naming.lookup("rmi://localhost:8888/RHello");


        //方法在服务端执行，将执行结果返回给客服端
        String helloworld = lookup.getFileStirng("helloworld");

        System.out.println(helloworld);
    }
}
